// console.log(process.env)

/* const fs = require('fs');

fs.stat('NodeJs.md', (err, stats) => {
  if (err) {
    console.error(err);
  }
  console.log(stats instanceof fs.Stats);
  console.dir(fs.Stats.prototype.__proto__);
  console.log(stats.isDirectory());
}); */

/* const path = require('path');

console.log(path.resolve('/foo', '/bar')); */

/* const ProgressBar = require('progress');

const bar = new ProgressBar(':bar', { total: 10 });
const timer = setInterval(() => {
  bar.tick();
  if (bar.complete) {
    clearInterval(timer);
  }
}, 100); */

const readline = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout,
});

readline.question(`What's your name?`, name => {
  console.log(`Hi ${name}!`);
  readline.close();
});